From: Jean-Philippe Braun Date: Sun, 24 Jun 2012 08:55:46 +0000 (+0200) Subject: panel: don't break when indicator has no menu X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6351 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9faac81a37afd2fad72133b55d657e3362eb3e60;p=gnome-shell.git panel: don't break when indicator has no menu Status indicators don't have necessarily a menu. If they have not we don't want to add the menu in the PopupMenuManager. https://bugzilla.gnome.org/show_bug.cgi?id=678694 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index 06d430056..a06cc92b5 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -1126,7 +1126,8 @@ const Panel = new Lang.Class({ if (!position) position = 0; this._insertStatusItem(indicator.actor, position); - this._menus.addMenu(indicator.menu); + if (indicator.menu) + this._menus.addMenu(indicator.menu); this._statusArea[role] = indicator; let destroyId = indicator.connect('destroy', Lang.bind(this, function(emitter) {